import request from '@/utils/request'

// 查询募资信息列表
export function listAmacRaise(query) {
  return request({
    url: '/raise/amacRaise/list',
    method: 'get',
    params: query
  })
}

// 查询募资信息详细
export function getAmacRaise(id) {
  return request({
    url: '/raise/amacRaise/' + id,
    method: 'get'
  })
}

// 保存募资信息
export function saveAmacRaise(data) {
  return request({
    url: '/raise/amacRaise/save',
    method: 'post',
    data: data
  })
}

// 删除募资信息
export function delAmacRaise(id) {
  return request({
    url: '/raise/amacRaise/' + id,
    method: 'delete'
  })
}

// 导出募资信息
export function exportAmacRaise(query) {
  return request({
    url: '/raise/amacRaise/export',
    method: 'get',
    params: query
  })
}

// 根据基金ID获取募资信息
export function getAmacRaiseByFundId(fundId) {
  return request({
    url: '/raise/amacRaise/getAmacRaiseByFundId',
    method: 'get',
    params: { 'fundId': fundId }
  })
}

/**
 * 删除募资信息-银行账户
 */
export function deleteAmacRaise(id) {
  return request({
    url: '/raise/amacRaise/account/' + id,
    method: 'delete'
  })
}
